import { lazy } from "react";
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons';
export let mainRouter=[
    {
        path:"/index/Home",
        element:lazy(()=>import("../page/index/Home")),
        title:"首页",
        icon:<FriendsO></FriendsO>
    },
    {
        path:"/index/Classify",
        element:lazy(()=>import("../page/index/Classify")),
        title:"分类",
        icon:<HomeO></HomeO>

    },
    {
        path:"/index/Shop",
        element:lazy(()=>import("../page/index/Shop")),
        title:"购物车",
        icon:<Search></Search>
    },
    {
        path:"/index/My",
        element:lazy(()=>import("../page/index/My")),
        title:"我的",
        icon:<SettingO></SettingO>
    }
]
let routes=[
{
    from :"/",
    to:"/index/Home"
},
{
    path:"/Detail/:id",
    element:lazy(()=>import("../page/Detail"))
},
{
    path:"*",
    element:lazy(()=>import("../page/Erroy404"))
},
{
    path:"/index",
    element:lazy(()=>import("../page/Index")),
    children:mainRouter
},
{
    path:"/Login",
    element:lazy(()=>import("../page/Login"))
}
]
export default routes